package com.rpay.web.controller.banner;

import com.rpay.common.dto.banner.BannerQueryDTO;
import com.rpay.common.vo.PcsResult;
import com.rpay.web.interceptor.authentic.AccessControl;
import com.rpay.web.interceptor.authentic.AccessControlType;
import com.rpay.web.service.BannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author XXX
 * @mail XXX@hotmail.com
 * @date 2018/5/12
 * @Description: Banner轮播图
 */
@RestController
@RequestMapping(value = "api/banner")
@AccessControl(type = AccessControlType.SECRET)
public class BannerController {
    @Autowired
    private BannerService bannerService;
    //获取轮播图列表
    @GetMapping(value = "")
    public PcsResult list() {
        BannerQueryDTO data = bannerService.list();
        return PcsResult.build(data);
    }
}
